home *** CD-ROM | disk | FTP | other *** search
/ Apple Macintosh CD: Powe…osh 6100/7100/8100 Series / Apple Macintosh CD - Power Macintosh 6100, 7100, 8100 series.7z / Apple Macintosh CD - Power Macintosh 6100, 7100, 8100 series.bin / About Virtual Memory < prev    next >
Text File  |  1994-10-14  |  5KB  |  52 lines

  1.  
  2.  
  3. Important Information About Virtual Memory
  4.  
  5. Congratulations on purchasing a Power Macintosh computer!  This document contains tips to help you take full advantage of your computer's speed and capabilities. Please read this document in addition to the manuals that came with your computer.
  6.  
  7. Turn on virtual memory
  8.  
  9. Virtual memory (VM) is a feature of the Macintosh that lets you use part of your hard disk as additional memory. If you are using an application program designed especially for Power Macintosh computers (that is, a “native” application program), turning on virtual memory may help you avoid running out of memory.
  10.  
  11. Your computer comes with virtual memory already turned on. With virtual memory turned on, a Power Macintosh program uses less memory than when virtual memory is turned off. If you check the program’s Get Info box before and after turning on virtual memory, you’ll see that the numbers in the Memory Requirements portion of the box have changed. This is because turning on virtual memory allows the program to use memory more efficiently.
  12.  
  13. For information on how to turn on virtual memory, choose Macintosh Guide from the Guide (question mark) menu. Then click “How do I use hard disk space as memory?” and “How do I manage Power Macintosh memory?” in the Memory topic area.
  14.  
  15. Note: Try setting VM on Power Macs to 50% more than the amount of physical memory (RAM)—for instance, if your computer has 8 MB of RAM, set VM to 12 MB.
  16.  
  17. You can also add physical memory (RAM) to your computer. See the user’s guide that came with your computer for more information.
  18.  
  19. Technical Information about virtual memory
  20.  
  21. The information below provides a more technical explanation of why most Power Macintosh users should turn on virtual memory (VM).
  22.  
  23. Background
  24.  
  25. When you turn on VM, your Power Macintosh computer is able to take advantage of a feature called file mapping. File mapping can significantly reduce the amount of physical memory required to launch a native application.
  26.  
  27. In a recent study of native Power Macintosh application programs (programs specially designed for Power Macintosh computers), Apple Computer found that with VM turned on, nearly 2 megabytes of RAM (memory) is saved when the programs open. 
  28.  
  29. On a Power Macintosh computer, you can save RAM simply by turning VM—it is not necessary to set VM to a large amount. 
  30.  
  31. How VM works on a non-PowerPC (68k) Macintosh
  32.  
  33. On a 68k system, the Segment Loader loads as much of the application as possible into memory. The amount of memory available is determined by the amount of available memory and the application’s “heap” size. (You set the heap size in the Get Info box).
  34.  
  35. If you increase an 8 MB system to 12 MB using VM, the computer creates a 12 MB space on the hard disk. When the system accesses instructions or data that are not resident in memory, a “page fault” occurs. A page fault causes the system to write the least recently used “page” to disk; then the system “swaps” in the page that contains the required data. This mechanism keeps the most frequently used pages in physical memory (“working set”) and the least frequently used ones in the VM space on the disk.  The locations of each page are kept straight by VM and the Memory Management Unit (MMU).
  36.  
  37. How VM works on a Power Macintosh computer
  38.  
  39. With native application programs on Power Macintosh computers, there is no Segment Loader. When VM is turned off, a native program is loaded into memory as a contiguous block. The amount of memory space required for all of the program”s code can be quite large.
  40.  
  41. However, native application programs comply with a strict new specification for the types of data that reside in the data and resource forks. In particular, the data fork contains read-only data for the program, while the resource fork contains information that can be modified. This is an important distinction: this specification assures that when VM is turned on the Code Fragment Manager (CFM) can take advantage of file mapping.
  42.  
  43. With file mapping active, only part of the resource fork must be loaded into memory. Items in the data fork of the application can remain on disk and will be “mapped” into memory by CFM as needed. This arrangementdramatically reduces the amount of data that must be immediately copied into memory when a program is launched. Also, read-only items in the data fork can be discarded when a page fault occurs, rather than writing the old information out to the disk. This reduces a write-read cycle to a single read. This is why the performance of VM is better on a Power Macintosh computer than on a 68k computer, even though the core code is unchanged.  
  44.  
  45. Apple Computer recommends setting VM on Power Macs to 50% more than the amount of physical memory—for instance, if your computer has 8 MB of RAM, set VM to 12 MB. If you want the best performance possible, but still want a reduced application footprint of file-mapping, set VM to the minimum amount.
  46.  
  47.  
  48.  
  49. ©  1994 Apple Computer, Inc. All rights reserved. Apple, the Apple logo, and Macintosh are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. Power Macintosh is a trademark of Apple Computer, Inc.
  50.  
  51.